@import '../../style/themes/index';
@import '../../style/mixins/index';

@message-prefix-cls: ~'@{ant-prefix}-message';

.@{message-prefix-cls} {
  .reset-component();

  position: fixed;
  top: 8px;
  left: 0;
  z-index: @zindex-message;
  width: 100%;
  line-height: 20px;
  pointer-events: none;

  &-notice {
    padding: 8px;
    text-align: center;
  }

  &-notice-content {
    display: inline-flex;
    box-sizing: border-box;
    min-width: 260px;
    padding: 9px 12px;
    background: @message-notice-content-bg;
    border: 1px solid @border-base-color;
    border-radius: @border-radius-base;
    box-shadow: @shadow-2;
    box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1);
    pointer-events: all;
  }
  &-custom-content {
    display: inline-flex;
    align-items: center;
    span {
      padding-left: 4px;
    }
  }
  &-success span {
    color: @success-color;
  }

  &-error span {
    color: @error-color;
  }

  &-warning span {
    color: @warning-color;
  }

  &-info span,
  &-loading span {
    color: #2476ff;
  }
  &-success .@{iconfont-css-prefix} {
    color: @success-color;
  }

  &-error .@{iconfont-css-prefix} {
    color: @error-color;
  }

  &-warning .@{iconfont-css-prefix} {
    color: @warning-color;
  }

  &-info .@{iconfont-css-prefix},
  &-loading .@{iconfont-css-prefix} {
    color: #2476ff;
  }

  .@{iconfont-css-prefix} {
    position: relative;
    top: 1px;
    margin-right: 8px;
    font-size: @font-size-lg;
  }

  &-notice.@{ant-prefix}-move-up-leave.@{ant-prefix}-move-up-leave-active {
    animation-name: MessageMoveOut;
    animation-duration: 0.3s;
  }
}

@keyframes MessageMoveOut {
  0% {
    max-height: 150px;
    padding: 8px;
    opacity: 1;
  }

  100% {
    max-height: 0;
    padding: 0;
    opacity: 0;
  }
}

@import './rtl';
